﻿using MyECommerceProject.Models;

namespace MyECommerceProject.Interfaces
{
    public interface IInventoryService
    {
        Task<IEnumerable<Inventory>> GetInventoriesAsync();
        Task<Inventory> GetInventoryByIdAsync(int inventoryId);
        Task AddInventoryAsync(Inventory inventory);
        Task UpdateInventoryAsync(Inventory inventory);
        Task DeleteInventoryAsync(int inventoryId);
        //Task SellProductAsync(int productId, int quantity);
        //Task RestockProductAsync(int productId, int quantity);
        //增加一条库存记录，并且根据库存记录改变对应的商品信息
        Task AddInventoryRecordAsync(int productId, bool sell, int count);
        //获取周期内所有库存记录
        Task<IEnumerable<Inventory>> GetInventoryRecordsAsync(int productId, DateOnly startDate, DateOnly endDate);
    }
}

